<?php
/**
 * Created by PhpStorm.
 * User: yy
 * Date: 2019/7/26
 * Time: 11:35
 */

namespace app\api\controller;

use app\common\service\control\ConcentrationRealService;

class Sixth extends BaseController
{
    /**
     * 当前值趋势图
     * @author yy by 2019/7/27
     * @throws \MongoDB\Driver\Exception\Exception
     */
    public function getCurrentValue()
    {
        $param = $this->request->param();
        # 模拟数据
//        $param = ['plan_number' => 'CZ2019-07-21 001号', 'company_id' => 1, 'type' => 'SO2', 'drain_id'=>1, 'control_mode_id'=>1, 'before_type'=>1];
        $list  = [];
        try {
            $concentrationRealService = new ConcentrationRealService();
            $list                     = $concentrationRealService->getCurrentValue($param);
        } catch (\Exception $e) {
            $this->error($e->getMessage());
        }
        $this->success('成功', $list);
    }
}